package me.shuzu.demo.text1;

import java.util.Random;

public class Demo2 {
    public static void main(String[] args) {
        int[] a = new int[10];
        Random r = new Random();
        for (int i = 0; i < a.length; i++) {
            int number = r.nextInt(100) + 1;
            a[i] = number;
        }
        for (int i = 0; i < a.length; i++) {
            System.out.print(a[i]+" ");
        }
        int sum = 0;
        for (int i = 0; i < a.length; i++) {
            sum = sum + a[i];
        }
        System.out.println(sum);
        double ans = sum / 10;
        System.out.println(ans);
        int count = 0;
        for (int i = 0; i < a.length; i++) {
            if (ans > a[i]) {
                count++;
            }
        }
        System.out.println(count);
    }
}
